import { BasicColumn } from '/@/components/Table';
import { FormSchema } from '/@/components/Table';
import { rules } from '/@/utils/helper/validator';
import { JVxeTypes, JVxeColumn } from '/@/components/jeecg/JVxeTable/types'

//表单数据
export const formSchema: FormSchema[] = [
    {
        label: '会计日历编码',
        field: 'code',
        defaultValue: '',
        colProps: {
            span: 6,
        },
        component: 'Input',
    },
    {
        label: '会计日历名称',
        field: 'name',
        defaultValue: '',
        colProps: {
            span: 6,
        },
        component: 'Input',
    },
    {
        label: '会计年份',
        field: 'accountingYear',
        component: 'DatePicker',
        colProps: {
            span: 4,
        },
        componentProps: {
            picker: 'year',
            showTime: false,
            valueFormat: 'YYYY'
        },
    },
    // {
    //   label: '租户id',
    //   field: 'tenantId',
    //   component: 'InputNumber',
    // },
    // TODO 主键隐藏字段，目前写死为ID
    {
        label: '',
        field: 'id',
        component: 'Input',
        show: false
    },
];
export const busSupplyDemandBalanceItemColumns: JVxeColumn[] = [
    {
        title: '会计年度',
        key: 'accountingYear',
        type: JVxeTypes.normal,
        width: "150px",
        defaultValue: '',
    },
    {
        title: '期间号',
        key: 'periodNo',
        type: JVxeTypes.normal,
        width: "200px",
        defaultValue: '',
    },
    {
        title: '开始日期',
        key: 'beginDate',
        type: JVxeTypes.normal,
        width: "200px",
        defaultValue: '',
    },
    {
        title: '结束日期',
        key: 'endDate',
        type: JVxeTypes.normal,
        width: "150px",
        defaultValue: '',
    },
    {
        title: '季度',
        key: 'quarter',
        type: JVxeTypes.normal,
        width: "150px",
        defaultValue: '',
    },
    {
        title: '月份',
        key: 'month',
        type: JVxeTypes.normal,
        defaultValue: '',
        slotName: 'materialSlot'
    },
    // {
    //   title: '周',
    //   key: 'spec',
    //   type: JVxeTypes.normal,
    //   width: "200px",
    //   defaultValue: '',
    // },
]


/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[] {
    // 默认和原始表单保持一致 如果流程中配置了权限数据，这里需要单独处理formSchema
    return formSchema;
}